import Vue from 'vue'
import Router from 'vue-router'
import Login from '@/views/login'
import Home from '@/views/home'
import Main from '@/views/main/main'
import User from '@/views/user/user'

Vue.use(Router)

export default new Router({
  routes: [
    {
      path: '/login',
      name: 'Login',
      component: Login
    },
    {
      path:'/',
      name:'Home',
      component:Home,
      redirect:{path:'/main'},
      children:[
        {
          name:'Main',
          path:'main',
          component:Main
        },
        {
          name:'User',
          path:'user',
          component:User
        }
      ]
    }
  ]
})
